// import getApiData, { getCPASTableAipsData, getNestApiData } from "@/services/cpasRequest";
import { getApiData, getNestApiData } from "../../tools/HttpClient";
// import {
//   queryVerifyState,
// } from "@/services/annotaionAnalysis";
// export const queryVerifyStatefs = async (params: any) => {
//   const res = await queryVerifyState(params)
//   return res
// }
export async function getCpasAllTids(params) {
    try {
        const res = await getApiData("account.design_table.allTids", params);
        if (res.ok) {
            return Promise.resolve({
                data: res.data,
                success: true,
            });
        }
        return Promise.resolve({
            data: res.data,
            success: false,
        });
    }
    catch (error) {
        return Promise.resolve({
            data: "接口getCpasAllTids出错了！",
            success: false,
        });
    }
}
export const getJudgmentSheetName = async (params) => {
    try {
        const res = await getNestApiData("/cpasTableEngine/getJudgmentSheetName", "post", params);
        if (res.ok) {
            return Promise.resolve({
                data: res.data,
                success: true,
            });
        }
        return Promise.resolve({
            data: "false",
            success: false,
        });
    }
    catch (error) {
        return Promise.resolve({
            data: "接口saveCpasDesc出错了！",
            success: false,
        });
    }
};
/**
 * 获取
 */
export const getCpasByCategory = async (params) => {
    try {
        const res = await getNestApiData("/cpasTableEngine/queryCpasDescByCategory", "post", params);
        if (res.ok) {
            return Promise.resolve({
                data: res.data,
                success: true,
            });
        }
        return Promise.resolve({
            data: res.data,
            success: false,
        });
    }
    catch (error) {
        return Promise.resolve({
            data: "接口queryCpasDescByCategory出错了！",
            success: false,
        });
    }
};
/**
 *
 */
export const saveCpasDescList = async (params) => {
    try {
        const res = await getNestApiData("/cpasTableEngine/saveCpasDesc", "post", params);
        if (res.ok) {
            return Promise.resolve({
                data: res.data,
                success: true,
            });
        }
        return Promise.resolve({
            data: res.data,
            success: false,
        });
    }
    catch (error) {
        return Promise.resolve({
            data: "接口saveCpasDesc出错了！",
            success: false,
        });
    }
};
